<div class="span6">

    <div class="control-group">
        <?php echo $form->labelEx($model, 'firstname', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'firstname', array(
                'placeholder' => $model->getAttributeLabel('firstname'),
                'class'       => 'input-file uniform_on input-reset'))
            ?>
            <font color="red"> <?php echo $form->error($model, 'firstname'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'lastname', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'lastname', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('lastname'),))
            ?>
            <font color="red"> <?php echo $form->error($model, 'lastname'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'birthday', array('class' => 'control-label', 'disabled' => 'disabled')) ?>
        <div class ="controls">
            <?php
            $birthdayOpts          = array(
                'class'       => 'datepicker',
                'placeholder' => $model->getAttributeLabel('birthday'),
                'readonly'    => true
            );
            $birthdayOpts['value'] = $model->birthday != NULL && $model->birthday > 0 ? @date('d/M/Y', $model->birthday) : '';

            echo $form->textField($model, 'birthday', $birthdayOpts)
            ?>
            <font color="red"> <?php echo $form->error($model, 'birthday'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'gender', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php echo $form->dropDownList($model, 'gender', Users::getGender()); ?>
            <font color="red"> <?php echo $form->error($model, 'gender'); ?> </font>
        </div>
    </div>

    <div class="control-group">
        <?php echo $form->labelEx($model, 'occupation', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'occupation', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('occupation')))
            ?>
            <font color="red"> <?php // echo $form->error($model, 'occupation');     ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'address', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'address', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('address')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'address'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'address2', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'address2', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('address2')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'address2'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'city', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'city', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('city')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'city'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'country', array('class' => 'control-label')); ?>
        <div class ="controls">                                    
            <?php echo $form->dropDownList($model, 'country', Country::getAllCountry(), array('options' => array('SGP' => array('selected' => true)))); ?>
            <font color="red"><?php echo $form->error($model, 'country'); ?></font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'postal_code', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'postal_code', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('postal_code')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'postal_code'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'home_phone', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'home_phone', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('home_phone')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'home_phone'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'mobile_phone', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'mobile_phone', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('mobile_phone')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'mobile_phone'); ?> </font>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'office_phone', array('class' => 'control-label')) ?>
        <div class ="controls">
            <?php
            echo $form->textField($model, 'office_phone', array(
                'class'       => 'input-file uniform_on input-reset',
                'placeholder' => $model->getAttributeLabel('office_phone')))
            ?>
            <font color="red"> <?php echo $form->error($model, 'office_phone'); ?> </font>
        </div>
    </div>

    <?php if (Yii::app()->controller->isAdmin): ?>
        <!--Nếu là Admin có thêm trường biz_id-->
        <div class="control-group">
            <?php echo $form->labelEx($model, 'biz_id', array('class' => 'control-label')) ?>
            <div class ="controls">
                <?php if (!$model->isNewRecord): ?>
                    <?php echo isset($model_customer->biz->name) ? $model_customer->biz->name : '' ?>
                <?php else: ?>
                    <?php echo $form->dropDownList($model, 'biz_id', Users::getAllBussiness()); ?>
                    <font color="red"> <?php echo $form->error($model, 'biz_id'); ?> </font>
                <?php endif; ?>
            </div>
        </div>
    <?php endif; ?>

    <?php if (Yii::app()->controller->isBussiness AND FALSE): ?>
        <!--Nếu là Biz có thêm trường author_id-->
        <div class="control-group">
            <?php echo $form->labelEx($model, 'staff_id', array('class' => 'control-label')) ?>
            <div class ="controls">               
                <?php
                $authorData = Users::getAllStaffOfBusiness();
                ?>
                <?php // echo $form->dropDownList($model, 'staff_id', $authorData); ?>
                <font color="red"> <?php echo $form->error($model, 'staff_id'); ?> </font>
            </div>
        </div>    
    <?php endif; ?>
</div>
